package cn.ziyoufa.smart.smartschool.util;

import android.annotation.SuppressLint;

import java.text.SimpleDateFormat;
import java.util.TimeZone;

/**
 * 创建人 ： 赵泽东
 * 创建时间：2018/9/3
 *
 * @param
 * @param
 */
public class A83TimerUtil {
    static long LoopTime;
    public static int k;
    public static String key;

    public static Boolean SetTimeEQU(long paramLong1, long paramLong2)
    {
        Logger.i("SetTimeEQU", "OpenTime:" + paramLong1);
        Logger.i("SetTimeEQU", "ClosedTime:" + paramLong2);
        Logger.i("SetTimeEQU", "Formate_OpenTime:" + getTimeString2Long(getZeroTimeZoneTranslateHMS(paramLong1)));
        Logger.i("SetTimeEQU", "Formate_ClosedTime:" + getTimeString2Long(getZeroTimeZoneTranslateHMS(paramLong2)));
        if (Math.abs(getTimeString2Long(getZeroTimeZoneTranslateHMS(paramLong1)) - getTimeString2Long(getZeroTimeZoneTranslateHMS(paramLong2))) < 60000L) {}
        for (boolean bool = true;; bool = false) {
            return Boolean.valueOf(bool);
        }
    }

    public static int getTimeAccuracy(long paramLong)
    {
        Logger.i("getTimeAccuracy", "MathTime:" + paramLong);
        return (int)(paramLong / 900L);
    }

    public static long getTimeString2Long(String paramString)
    {
        String[] paramStrings = paramString.split(":");
        return (Integer.parseInt(paramStrings[0]) * 3600 + Integer.parseInt(paramStrings[1]) * 60 + Integer.parseInt(paramStrings[2])) * 1000L;
    }

    @SuppressLint({"SimpleDateFormat"})
    public static String getTranslateHMS(long paramLong)
    {
        return new SimpleDateFormat("HH:mm:ss").format(Long.valueOf(paramLong));
    }

    public static String getZeroTimeZoneTranslateHMS(long paramLong)
    {
        SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("HH:mm:ss");
        localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT+00:00"));
        return localSimpleDateFormat.format(Long.valueOf(paramLong));
    }

    public static byte[] longToByteArray1(int paramInt, long paramLong)
    {
        return new byte[] { 0, -86, -1, 85, (byte)paramInt, (byte)(int)(paramLong >> 16 & 0xFF), (byte)(int)(paramLong >> 8 & 0xFF), (byte)(int)(paramLong & 0xFF), 85 };
    }

    public static String showYMDHMS(long paramLong)
    {
        SimpleDateFormat localSimpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        localSimpleDateFormat.setTimeZone(TimeZone.getTimeZone("GMT+00:00"));
        return localSimpleDateFormat.format(Long.valueOf(paramLong));
    }
}
